home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / netbios / nb-check / nbcheck.c next >
Text File  |  1996-07-10  |  1KB  |  35 lines

  1. /* NBCHECK.C - program checks to see if NetBIOS is available and how  */
  2. /* many network names, commands & sessions are present. Uses NetBIOS  */
  3. /* interrupt (INT 2Ah). Programmer: Paul McGinnis, AST Research Data  */
  4. /* Comm Support (Dept. 430). 714-863-9991.                            */
  5. /*                                                                    */
  6. /* Compiled using Borland's Turbo C v1.5 and tiny memory model        */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10.  
  11. main()
  12. {
  13.   typedef unsigned char byte;
  14.   typedef unsigned int word;
  15.   byte iflag;
  16.   word names, commands, sessions;
  17.   char *PRGMR = "Programmer: Paul McGinnis - v1.00";
  18.   puts("NetBIOS test program. Version 1.00");
  19.   _AH = 0;
  20.   geninterrupt(0x2a);
  21.   iflag = _AH;
  22.   if (!iflag)
  23.   {
  24.     puts("    *** ERROR - NetBIOS not installed. ***");
  25.     return;
  26.   }
  27.   _AX = 0x500;
  28.   geninterrupt(0x2a);
  29.   names = _BX;
  30.   commands = _CX;
  31.   sessions = _DX;
  32.   printf("# of network names available: %u\n", names);
  33.   printf("# of network commands available: %u\n", commands);
  34.   printf("# of network sessions available: %u\n", sessions);
  35. }